package com.open.common.model.po;

import java.util.List;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

public class TreeNode<T> extends BaseEntity<T> {

    private static final long serialVersionUID = 1L;

    private String text; // 显示名称

    private String parent; // 父节点ID

    private boolean isleaf; // 是否是叶子节点

    private List<TreeNode> children; // 子节点集合

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    public boolean isIsleaf() {
        return isleaf;
    }

    public void setIsleaf(boolean isleaf) {
        this.isleaf = isleaf;
    }

    public List<TreeNode> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNode> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }

}
